import Vue from 'vue'
import Router from 'vue-router'
import News from '@/pages/news/News'
import Movies from '@/pages/movies/Movies'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/news'
    },
    {
      path: '/news',
      name: 'News',
      component: News
    },
    {
      path: '/movies',
      name: 'Movies',
      component: Movies
    },
    {
      path: '/detail/:id',
      name: 'Detail',
      component: () => import('@/pages/news/components/Detail')
    },
    {
      path: '/movie-detail/:id',
      name: 'MovieDetail',
      component: () => import('@/pages/movies/components/Detail')
    },
    {
      path: '/movie-more',
      name: 'MovieMore',
      component: () => import('@/pages/movies/components/More')
    }
  ]
})
